package com.study.common;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * zookeeper配置类
 * Created by zhangbo on 2020/5/30.
 */
@Getter
@Configuration
@Component
public class ZookeeperConfig {

    /**
     * zookeeper服务地址（含端口）
     */
    @Value("${zookeeper.address}")
    private String zkAddress;

    /**
     * zookeeper服务连接超时时间
     */
    @Value("${zookeeper.timeout:5000}")
    private int timeout;

    /**
     * 服务注册在zookeeper下的目录
     */
    @Value("${zookeeper.register.path:/server/register/path}")
    private String zookeeperRegisterPath;

}
